﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link rel="stylesheet" href="../../Content/silver/sys_style.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../../Content/silver/style.css" type="text/css" />
<script type="text/javascript" src="../../Scripts/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.jclock.js"></script>
<script type="text/javascript">
    $(function () {

        $('#time').jclock({ withDate: true });
        //	$('#local').click(function(){$('#demo').jclock()});
        //	$('#with').click(function(){$('#demo').jclock({withDate:true, withWeek:true})});
        //$('#time').jclock({withDate:true, utc:true});
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        timerReminder0 = setInterval("updateTime()", 120000);

    });



    function updateTime() {
        //alert(11);
        $.get("OnLine.aspx?d=" + Math.random(), { Action: "get" }, function (data, textStatus) {
            //alert(data);
            //var arr = data.split('|');
            if (data.indexOf('<span class="wendu">') > -1) {
                var arr = data.split('|');

                $('#xmname').html(arr[0]);
                $('#info').html("，" + arr[1]);
                if (isbaojing11) {
                    showBaoJing1();
                }
            }
            else {
                $('#info').html("");
            }
        });


    }

    var isbaojing11 = true;
    function showBaoJing1() {
        isbaojing11 = false;
        showBaoJing();
    }

    var isbaojing = true;
    function showBaoJing() {
        $('#baojingArea')[0].style.display = "block";

        if ($('#baojing')[0].style.color == '#fff') {
            $('#baojing')[0].style.color = "#FF0000";
        }
        else {
            $('#baojing')[0].style.color = "#fff";
        }
        if (isbaojing) {
            setTimeout("showBaoJing()", 500);
        }
        else {
            $('#baojingArea')[0].style.display = "none";
        }
    }

    function openBaoJing() {
        isbaojing = false;
        $('#baojingArea')[0].style.display = "none";
    }


</script>

</head>
<body>
<%
    User user = (User)ViewData["user"];
if (user == null)
{
%>
<script type="text/javascript">
    window.parent.location = "/Account/LogOn";
</script>
<%
    return;
}
%>


    <div class="header">
        <h1><%=user.Factory.Name %></h1>
        
        <%=Html.ActionLink("退出", "Logoff", "Account", null, new { target = "_top", @class = "logout" })%>
        <label class="user_area">您好：<%=user.RealName%>/<em><%=user.Name%></em><label>(<%=user.Role.Name %>)</label></label>
        <label class="user_left"></label>
    </div>

 
</body>
</html>